<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改传感器参数')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-parameters-edit" th:object="${sensorParameters}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">温度：</label>
                <div class="col-sm-8">
                    <input name="temperature" th:field="*{temperature}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">压力：</label>
                <div class="col-sm-8">
                    <input name="pressure" th:field="*{pressure}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">溶解氧：</label>
                <div class="col-sm-8">
                    <input name="dissolvedOxygen" th:field="*{dissolvedOxygen}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">ph：</label>
                <div class="col-sm-8">
                    <input name="ph" th:field="*{ph}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电导率：</label>
                <div class="col-sm-8">
                    <input name="conductivity" th:field="*{conductivity}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">浊度：</label>
                <div class="col-sm-8">
                    <input name="turbidity" th:field="*{turbidity}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">ORP：</label>
                <div class="col-sm-8">
                    <input name="orp" th:field="*{orp}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">站点：</label>
                <div class="col-sm-8">
                    <input name="site" th:field="*{site}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/parameters";
        $("#form-parameters-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-parameters-edit').serialize());
            }
        }
    </script>
</body>
</html>